<?php
date_default_timezone_set('PRC');//设置中国时区
define('START_TIME', microtime(true));
define('START_MEM', memory_get_usage());

define('VERSION', '3.0.2');
define('APP_PATH', __DIR__);
define('APP_SITE_PATH', dirname(__FILE__, 2) . '/');

define('ACTION_PATH', APP_SITE_PATH . 'action/');
define('CONFIG_PATH', APP_SITE_PATH . 'config/');
define('CORE_PATH', APP_SITE_PATH . 'core/');
define('PUBLIC_PATH', APP_SITE_PATH . 'public/');
define('VENDOR_PATH', APP_SITE_PATH . 'vendor/');
define('VIEWS_PATH', APP_SITE_PATH . 'views/');
define('RUNTIME_PATH', APP_SITE_PATH . 'runtime/');
define('CACHE_PATH', RUNTIME_PATH . 'cache/');
define('TEMP_PATH', RUNTIME_PATH . 'views/');
define('LOG_PATH', RUNTIME_PATH . 'log/');

//环境常量
define('IS_CLI', PHP_SAPI == 'cli' ? true : false);                 //是否是cli模式:true/false
define('IS_WIN', strpos(PHP_OS, 'WIN') !== false);   //是否是win系统:true/false

//载入Loader类
require CORE_PATH . 'Loader.php';

//注册自动加载
\core\Loader::register();

\core\App::run();